package prvydevw.manager;

import java.util.Calendar;
import java.util.List;
import prvydevw.entity.Payment;
import prvydevw.entity.Subject;

/**
 *
 * @author ivo
 */
public interface PaymentManager
{
    void createPayment(Payment payment);
    
    void updatePayment(Payment payment);
    
    void deletePayment(Payment payment);
    
    Payment findPayment(Long id);
    
    List<Payment> findAllPayments();
    
    /**
     * Returns payments for specified subject and date range.
     * 
     * If subject is null, this will return payments for all subjects. If any
     * of dates is null, corresponding boundary is unlimited
     * 
     * @param subject Subject for payments to return or null for all subjects
     * @param dateFrom 
     * @param dateTo
     * @return List of payments
     */
    List<Payment> findAllPayments(Subject subject, Calendar dateFrom, Calendar dateTo);
}
